package evo.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class UserController {

    @RequestMapping(value = "/literal")
    public ModelAndView literal(){
        ModelAndView mv = new ModelAndView();
        mv.addObject("sex",1);
        mv.addObject("data","SpringBoot Data");
        mv.addObject("flag",true);
        mv.setViewName("literal");
        return mv;
    }

    @RequestMapping(value = "/splice")
    public ModelAndView splice(){
        ModelAndView mv = new ModelAndView();
        mv.addObject("totalRows",123);
        mv.addObject("totalPage",13);
        mv.addObject("currentPage",2);
        mv.setViewName("splice");
        return mv;
    }
}
